/*=============================================================================

  SYSTEM MANAGER COMMAND DEFINITION

  FILE: SYSmgr_CMD.h
  
  DESCRIPTION

    Application Manager Command Definition

  EXTERNALIZED FUNCTIONS

    
  Copyright (c) DaeSung Engineering Inc. All rights reserved.

=============================================================================*/
/*=============================================================================

                             EDIT HISTORY

  ---------  -------  -------------------------------------------------------
    when       who     what, where, why
  ---------  -------  -------------------------------------------------------
   06/28/03   nso4th   Version 0.1

=============================================================================*/

#ifndef _SYSMGR_CMD_H_
#define _SYSMGR_CMD_H_

/*=============================================================================
  HEADER INCLUSION
=============================================================================*/

/*=============================================================================
  CONSTANT DEFINITION
=============================================================================*/

/*=============================================================================
  COMMAND DEFINITION
=============================================================================*/
typedef enum
{
	SYSMGR_CMD_BASE = 0x00,
		
	DEVINIT_C,
	DEVCLOSE_C,
	DEVRESET_C,

	// RESET
	RESET_START_C,
	RESET_CLEAR_C,
	RESET_HOME_C,

	// CONTROL
	AUTO_START_C,
	MANUAL_START_C,

	
	// ALL STATE
	STATE_STOP_C,
	STATE_RESET_C
} SYSmgr_Cmd_e;

typedef enum
{
	TIMER_0_ID = 0x00,
	TIMER_1_ID,
	TIMER_2_ID,
	TIMER_3_ID,
	TIMER_4_ID,
	TIMER_5_ID,
	TIMER_6_ID,
	TIMER_7_ID,
	TIMER_ERR_ID = TIMER_0_ID
} SYSmgr_TimerID_e;

//---------------------------------------------------------
// TIMER DEFINITION
//---------------------------------------------------------
#define SET_ERRTIMER(elapse)		Timer_Reg(TIMER_ERR_ID, (elapse))
#define CLR_ERRTIMER()				Timer_Dereg(TIMER_ERR_ID)

//////////////// SYSTEM TIMER

// [0] Error timer
#define TIMER_ERR_ID				(TIMER_0_ID)
#define TIMER_ERR_E					(ERR_TIMEOUT_E)

// [1] Reset timer
#define TIMER_RST_ID				(TIMER_1_ID)
#define TIMER_RST_E					(TIMER_1_E)

/////////////// CUSTOM TIMER
// [2] General timer
#define TIMER_GEN_ID				(TIMER_2_ID)
#define TIMER_GEN_E					(TIMER_2_E)

#endif /* _SYSMGR_CMD_H_ */


/*=============================================================================
  EXTERNALIZED FUNCTION DESCRPTIONS
=============================================================================*/
/*--- END OF SYSmgr_Cmd.H ---*/
